package com.demo.boot.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;

/**
 * @author root
 * @date 2021-04-27 13:28
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Student {

    private String name;

    private LocalDate birth;

    /**
     * jackson 格式使用 @JsonIgnore 忽略字段返回
     * fastjson 使用
     */
//    @JsonIgnore
    @JSONField(serialize = false)
    private String sex;

    private Integer age;
}
